﻿package tests;
import flash.filters.BlurFilter;
import flash.filters.DropShadowFilter;
import flash.filters.GlowFilter;
import fpc.controls.text.Label;
import fpc.styles.ExtendedTextFormat;
import fpc.styles.Style;
import fpc.utils.ClassFactory;
import fpc.utils.FunctionFactory;
import fpc.controls.text.Text;

class LabelTest extends GenericTest
{
	public function new() 
	{
		super();
	}
	
	override function init()
	{
		var format = new ExtendedTextFormat();
		format.font = 'Tahoma';
		
		var label = new Label('Label 0');
		label.addTo(this);
		label.width = 100;
		label.style = new Style().setTextFormat(
			Label.TEXT_FORMAT_LABEL,
			format
		);
		
		var label = new Label('Label 1');
		label.y = 100;
		label.addTo(this);
		label.textFormat = new ExtendedTextFormat()
			.setFont('Tahoma')
			.setParameters(12, 0xff0000, true, true);
		
		var label = new Label('Label 2');
		label.y = 200;
		label.addTo(this);
		label.textFormat = format.clone()
			.setFilters([new GlowFilter(0x707070)]);
			
			
		var text = new Text('
			text text text text text text
			text text text text text text
			text text text text text text
			text text text text text text
		');
		text.addTo(this);
	}
}